Optimal. Leaf size=132 \[ \frac {a^3 c^4 (5 B+i A) (1-i \tan (e+f x))^6}{6 f}-\frac {4 a^3 c^4 (2 B+i A) (1-i \tan (e+f x))^5}{5 f}+\frac {a^3 c^4 (B+i A) (1-i \tan (e+f x))^4}{f}-\frac {a^3 B c^4 (1-i \tan (e+f x))^7}{7 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac {a^3 c^4 (5 B+i A) (1-i \tan (e+f x))^6}{6 f}-\frac {4 a^3 c^4 (2 B+i A) (1-i \tan (e+f x))^5}{5 f}+\frac {a^3 c^4 (B+i A) (1-i \tan (e+f x))^4}{f}-\frac {a^3 B c^4 (1-i \tan (e+f x))^7}{7 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^4 \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^3 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (4 a^2 (A-i B) (c-i c x)^3-\frac {4 a^2 (A-2 i B) (c-i c x)^4}{c}+\frac {a^2 (A-5 i B) (c-i c x)^5}{c^2}+\frac {i a^2 B (c-i c x)^6}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a^3 (i A+B) c^4 (1-i \tan (e+f x))^4}{f}-\frac {4 a^3 (i A+2 B) c^4 (1-i \tan (e+f x))^5}{5 f}+\frac {a^3 (i A+5 B) c^4 (1-i \tan (e+f x))^6}{6 f}-\frac {a^3 B c^4 (1-i \tan (e+f x))^7}{7 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 7.80, size = 172, normalized size = 1.30 \[ \frac {a^3 c^4 \sec (e) \sec ^7(e+f x) (70 (B-i A) \cos (2 e+f x)+70 (B-i A) \cos (f x)-70 A \sin (2 e+f x)+147 A \sin (2 e+3 f x)+49 A \sin (4 e+5 f x)+7 A \sin (6 e+7 f x)+175 A \sin (f x)-70 i B \sin (2 e+f x)+21 i B \sin (2 e+3 f x)+7 i B \sin (4 e+5 f x)+i B \sin (6 e+7 f x)-35 i B \sin (f x))}{840 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 173, normalized size = 1.31 \[ \frac {{\left (1680 i \, A + 1680 \, B\right )} a^{3} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (2352 i \, A - 336 \, B\right )} a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (784 i \, A - 112 \, B\right )} a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (112 i \, A - 16 \, B\right )} a^{3} c^{4}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 3.86, size = 229, normalized size = 1.73 \[ \frac {1680 i \, A a^{3} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 1680 \, B a^{3} c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 2352 i \, A a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} - 336 \, B a^{3} c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 784 i \, A a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 112 \, B a^{3} c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 112 i \, A a^{3} c^{4} - 16 \, B a^{3} c^{4}}{105 \, {\left (f e^{\left (14 i \, f x + 14 i \, e\right )} + 7 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 21 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 35 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 35 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 21 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 7 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 147, normalized size = 1.11 \[ \frac {c^{4} a^{3} \left (-\frac {i B \left (\tan ^{7}\left (f x +e \right )\right )}{7}-\frac {i A \left (\tan ^{6}\left (f x +e \right )\right )}{6}-\frac {2 i B \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {B \left (\tan ^{6}\left (f x +e \right )\right )}{6}-\frac {i A \left (\tan ^{4}\left (f x +e \right )\right )}{2}+\frac {A \left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {i B \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{2}-\frac {i A \left (\tan ^{2}\left (f x +e \right )\right )}{2}+\frac {2 A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.87, size = 148, normalized size = 1.12 \[ \frac {-60 i \, B a^{3} c^{4} \tan \left (f x + e\right )^{7} + {\left (-70 i \, A + 70 \, B\right )} a^{3} c^{4} \tan \left (f x + e\right )^{6} + 84 \, {\left (A - 2 i \, B\right )} a^{3} c^{4} \tan \left (f x + e\right )^{5} + {\left (-210 i \, A + 210 \, B\right )} a^{3} c^{4} \tan \left (f x + e\right )^{4} + 140 \, {\left (2 \, A - i \, B\right )} a^{3} c^{4} \tan \left (f x + e\right )^{3} + {\left (-210 i \, A + 210 \, B\right )} a^{3} c^{4} \tan \left (f x + e\right )^{2} + 420 \, A a^{3} c^{4} \tan \left (f x + e\right )}{420 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.59, size = 156, normalized size = 1.18 \[ -\frac {\frac {a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (2\,B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{5}-A\,a^3\,c^4\,\mathrm {tan}\left (e+f\,x\right )+\frac {a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (B+A\,2{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}+\frac {a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{6}+\frac {B\,a^3\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^7\,1{}\mathrm {i}}{7}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.44, size = 303, normalized size = 2.30 \[ \frac {112 A a^{3} c^{4} + 16 i B a^{3} c^{4} + \left (784 A a^{3} c^{4} e^{2 i e} + 112 i B a^{3} c^{4} e^{2 i e}\right ) e^{2 i f x} + \left (2352 A a^{3} c^{4} e^{4 i e} + 336 i B a^{3} c^{4} e^{4 i e}\right ) e^{4 i f x} + \left (1680 A a^{3} c^{4} e^{6 i e} - 1680 i B a^{3} c^{4} e^{6 i e}\right ) e^{6 i f x}}{- 105 i f e^{14 i e} e^{14 i f x} - 735 i f e^{12 i e} e^{12 i f x} - 2205 i f e^{10 i e} e^{10 i f x} - 3675 i f e^{8 i e} e^{8 i f x} - 3675 i f e^{6 i e} e^{6 i f x} - 2205 i f e^{4 i e} e^{4 i f x} - 735 i f e^{2 i e} e^{2 i f x} - 105 i f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________